from fdfs_client.client import Fdfs_client

if __name__ == '__main__':
    client = Fdfs_client('client.conf')
    result = client.upload_by_filename('/home/python/Desktop/pic/news/1.jpg')
    '''
    {
    'Storage IP': '192.168.247.128',
    'Status': 'Upload successed.',
    'Group name': 'group1',
    'Remote file_id': 'group1/M00/00/02/wKj3gFxENz6AE9SPAAF8tkqbN5Q347.jpg',
    'Local file name': '/home/python/Desktop/pic/news/1.jpg',
    'Uploaded size': '95.00KB'
    }
    '''
    print(result)
